package cn.edu.scau.cmi.zhuangzhihong.singletonmodel;

public class president {
    private String name=null;
    private static int time=0;
	private president(String name) {
	   this.name=name;
   }
	private static president instance=null;
	public static president getInstance() {
		time++;
		 if(instance==null) {
			 instance= new president("毛泽东");
		 }
		 return instance;
	}
	public String getname() {
		return name;
	}
	public int gettime() {
		return time;
	}
}
